package com.xbs.controller.user;

import java.io.IOException;
import java.util.List;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.xbs.controller.base.BaseServlet;
import com.xbs.entity.MyCenterEntity;
import com.xbs.service.user.MyCenterService;
@WebServlet("/userview/myCenter/duan")
public class MyCenter_duan extends BaseServlet {
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		String uname = (String) req.getSession().getAttribute("uname");
		MyCenterService mycenterservice = new MyCenterService();
		List<MyCenterEntity> mycenterlist = mycenterservice.getDuan(uname, null, null, null);
		req.setAttribute("mycenter", mycenterlist);
		forward("userview/myCenter/myCenter_duan");
	}
}
